package com.xueqiu.movieplaymanagersystem.entity;

import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @author xueqiu
 * @Description: 电影表
 */
public class Movie implements Serializable {
    /**
     * 电影ID
     */
    private String id;

    /**
     * 电影名称
     */
    @NotBlank(message = "电影名称不能为空")
    private String title;

    /**
     * 电影海报URL
     */
    @NotBlank(message = "电影海报URL不能为空")
    @URL(message = "电影海报URL格式错误")
    private String headerImageUrl;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 更新时间
     */
    private Date updateDate;

    /**
     * 电影描述
     */
    private String description;

    /**
     * 电影导演
     */
    private String author;

    /**
     * 电影文件链接
     */
    private String movieLink;

    public Movie() {
    }

    public String getMovieLink() {
        return movieLink;
    }

    public void setMovieLink(String movieLink) {
        this.movieLink = movieLink;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getHeaderImageUrl() {
        return headerImageUrl;
    }

    public void setHeaderImageUrl(String headerImageUrl) {
        this.headerImageUrl = headerImageUrl;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "Movie{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", headerImageUrl='" + headerImageUrl + '\'' +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", description='" + description + '\'' +
                ", author='" + author + '\'' +
                '}';
    }
}